package sketch.generator.experiment;

import java.util.Collection;
import java.util.List;

import sketch.generator.SubsetValueGenerator;

public class SubsetValueGroupGenerator<T> extends ValueGroupGenerator<T> {
	
	public final SubsetValueGenerator<T> generator;
	
	public SubsetValueGroupGenerator(T...ts) {
		generator = new SubsetValueGenerator<T>(ts);
	}
	
	public SubsetValueGroupGenerator(Collection<T> ts) {
		generator = new SubsetValueGenerator<T>(ts);
	}
	
	@Override
	public void reset() {
		super.reset();
		this.generator.reset();
	}
	
	@Override
	public boolean hasNext() {
		return generator.hasNextValue();
	}

	@Override
	protected ValueGroup<T> generateNext() {
		List<T> ts = generator.nextValue();
//		if(ts.size() == 0) {
//			return this.createEmptyValue();
//		}
		return this.createMultiValue(ts);
	}

}
